﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ZBZH_Manage_Order.PublicMethod
{
    public class GetMerInfo
    {
        ServiceReference1.Service1Client wsdcser = new ServiceReference1.Service1Client();

        public List<Model.View_Order_MerSet> GetAllMer(Model.View_Order_MerSet merinfomodel, out string tal)
        {
            int acc = int.Parse(merinfomodel.MerID.ToString());
            string result = wsdcser.GetOrder_Mer(GetYZM._YZM, 1);
            Model.DataResult dr = ParseClass<Model.DataResult>.StrDeserialize(result, 1);
            tal = dr.total.ToString();
            List<Model.View_Order_MerSet> ls = new List<Model.View_Order_MerSet>();
            JObject jb = JObject.Parse(result);
            IList<JToken> jieguo = jb["rows"].Children().ToList();
            ls = ParseClass<Model.View_Order_MerSet>.JsonList(jieguo);
            return ls;
        }
    }
} 